using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class diet_menuMap : EntityTypeConfiguration<diet_menu>
    {
        public diet_menuMap()
        {
            // Primary Key
            this.HasKey(t => t.diet_menu_id);

            // Properties
            this.Property(t => t.menu_desc)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("diet_menu");
            this.Property(t => t.diet_menu_id).HasColumnName("diet_menu_id");
            this.Property(t => t.menu_desc).HasColumnName("menu_desc");
            this.Property(t => t.exchange_share_num).HasColumnName("exchange_share_num");
            this.Property(t => t.energe_num).HasColumnName("energe_num");
        }
    }
}
